package org.shopen.ai.puremvc.model.problem.cities
{
	import org.shopen.ai.puremvc.model.problem.IAction;
	import org.shopen.ai.puremvc.model.problem.IState;
	
	public class GoAction implements IAction
	{
		// represents target state (destination).		
		protected var state : IState;
		
		public function GoAction(state : IState)
		{
			this.state = state;
		}
		
		public function act() : IState
		{
			return state;
		}
		
		public function toString() : String
		{
			// i.e.: Go(Kyiv)
			var result : String = "Go(" + state.toString() + ")";
			return result;
		}
	}
}